/* 1.2CPT 3.5 Inch Initial Code*/ 
Void ILI9486_CPT_Initial_Code(void)
{/* VCI=2.8V*/ 
/************** Reset LCD Driver ****************//*/ 
LCD_nRESET = 1;
    TFTLCD_DELAY8, 1,  /* Delay 1ms*/ 
LCD_nRESET = 0;
    TFTLCD_DELAY8, 10,  /* Delay 10ms // This delay time is necessary*/ 
LCD_nRESET = 1;
    TFTLCD_DELAY8, 120,  /* Delay 120 ms*/ 
/************** Start Initial Sequence **********/**/ */ 
    (0xF2),0x18,0xA3,0x12,0x02,0xB2,0x12,0xFF,0x10,0x00,
    (0xF8),0x21,0x04,
    (0xF9),0x00,0x08,
    (0x36),0x08,
    (0xB4),0x00,
    (0xC1),0x41,
    (0xC5),0x00,0x53,
    (0xE0),0x0F,0x1B,0x18,0x0B,0x0E,0x09,0x47,0x94,0x35,0x0A,0x13,0x05,0x08,0x03,0x00,
    (0xE1),0x0F,0x3A,0x37,0x0B,0x0C,0x05,0x4A,0x24,0x39,0x07,0x10,0x04,0x27,0x25,0x00,
    (0x11),
    TFTLCD_DELAY8, 120, 
    (0x29),
}
Void ILI9486_EnterSleep_Code(void)
{
    (0x28))
    TFTLCD_DELAY8, 10, 
    (0x10), /* Set_address_mode*/ 
    TFTLCD_DELAY8, 120, 
}
Void ILI9486_ExitSleep_Code(void)
{
    (0x11), /* Set_address_mode*/ 
    TFTLCD_DELAY8, 120, 
    (0x29))
}

/* 2.2 HSD 3.5 Inch Initial Code*/ 
Void ILI9486_HSD_Initial_Code(void)
{/* VCI=2.8V*/ 
/************** Reset LCD Driver ****************//*/ 
LCD_nRESET = 1;
    TFTLCD_DELAY8, 1,  /* Delay 1ms*/ 
LCD_nRESET = 0;
    TFTLCD_DELAY8, 10,  /* Delay 10ms // This delay time is necessary*/ 
LCD_nRESET = 1;
    TFTLCD_DELAY8, 120,  /* Delay 120 ms*/ 
/************** Start Initial Sequence **********/**/ */ 
    (0xF2),0x18,0xA3,0x12,0x02,0xB2,0x12,0xFF,0x10,0x00,
    (0xF8),0x21,0x04,
    (0xF9),0x00,0x08,
    (0x36),0x08,
    (0xB4),0x00,
    (0xB6),0x02,0x22,
    (0xC1),0x41,
    (0xC5),0x00,0x18,
    (0xE0),0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,
    (0xE1),0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,
    (0x11),
    TFTLCD_DELAY8, 120, 
    (0x29),
}
Void ILI9486_EnterSleep_Code(void)
{
    (0x28))
    TFTLCD_DELAY8, 10, 
    (0x10),
    TFTLCD_DELAY8, 120, 
}
Void ILI9486_ExitSleep_Code(void)
{
    (0x11),
    TFTLCD_DELAY8, 120, 
    (0x29))
}

/* 3.2 TM 3.2 Inch Initial Code*/ 
Void ILI9486_TM_Initial_Code(void)
{/* VCI=2.8V*/ 
/************** Reset LCD Driver ****************//*/ 
LCD_nRESET = 1;
    TFTLCD_DELAY8, 1,  /* Delay 1ms*/ 
LCD_nRESET = 0;
    TFTLCD_DELAY8, 10,  /* Delay 10ms // This delay time is necessary*/ 
LCD_nRESET = 1;
    TFTLCD_DELAY8, 120,  /* Delay 120 ms*/ 
/************** Start Initial Sequence **********/**/ */ 
    (0xF2),0x18,0xA3,0x12,0x02,0xB2,0x12,0xFF,0x10,0x00,
    (0xF8),0x21,0x04,
    (0xF9),0x00,0x08,
    (0x36),0x08,
    (0xB4),0x00,
    (0xB6),0x02,0x22,
    (0xC1),0x41,
    (0xC5),0x00,0x55,
    (0xE0),0x0F,0x21,0x1C,0x0B,0x0E,0x08,0x49,0x98,0x38,0x09,0x11,0x03,0x14,0x10,0x00,
    (0xE1),0x0F,0x2F,0x2B,0x0C,0x0E,0x06,0x47,0x76,0x37,0x07,0x11,0x04,0x23,0x1E,0x00,
    (0x11),
    TFTLCD_DELAY8, 120, 
    (0x29),
}
Void ILI9486_EnterSleep_Code(void)
{
    (0x28))
    TFTLCD_DELAY8, 10, 
    (0x10),
    TFTLCD_DELAY8, 120, 
}
Void ILI9486_ExitSleep_Code(void)
{
    (0x11),
    TFTLCD_DELAY8, 120, 
    (0x29))
}


/* 4.2 WTK 3.5 Inch Initial Code*/ 
Void ILI9486_WTK_Initial_Code(void)
{/* VCI=2.8V*/ 
/************** Reset LCD Driver ****************//*/ 
LCD_nRESET = 1;
    TFTLCD_DELAY8, 1,  /* Delay 1ms*/ 
LCD_nRESET = 0;
    TFTLCD_DELAY8, 10,  /* Delay 10ms // This delay time is necessary*/ 
LCD_nRESET = 1;
    TFTLCD_DELAY8, 120,  /* Delay 120 ms*/ 
/************** Start Initial Sequence **********/**/ */ 
    (0xF2),0x18,0xA3,0x12,0x02,0xB2,0x12,0xFF,0x10,0x00,
    (0xF8),0x21,0x04,
    (0xF9),0x00,0x08,
    (0x21),
    (0x36),0x08,
    (0xB4),0x00,
    (0xB6),0x02,0x22,
    (0xC1),0x41,
    (0xC5),0x00,0x53,
    (0xE0),0x0F,0x10,0x08,0x05,0x09,0x05,0x37,0x98,0x26,0x07,0x0F,0x02,0x09,0x07,0x00,
    (0xE1),0x0F,0x38,0x36,0x0D,0x10,0x08,0x59,0x76,0x48,0x0A,0x16,0x0A,0x37,0x2F,0x00,
    (0x11),
    TFTLCD_DELAY8, 120, 
    (0x29),
}
Void ILI9486_EnterSleep_Code(void)
{
    (0x28))
    TFTLCD_DELAY8, 10, 
    (0x10),
    TFTLCD_DELAY8, 120, 
}
Void ILI9486_ExitSleep_Code(void)
{
    (0x11),
    TFTLCD_DELAY8, 120, 
    (0x29))
}


